package edu.calvin.djs32.cs214.interpreters.prettyprinter;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;


public class HTMLGeneratorTest {
	
	private IHTMLGenerator myGenerator;
	
	@Before
	public void setUp() {
		myGenerator = new HTMLGenerator();
	}
	
	@Test
	public void shouldGeneratePreTags(){
		assertEquals("<pre>foo</pre>", myGenerator.pre("foo"));
		assertEquals("<pre>bar</pre>", myGenerator.pre("bar"));
		assertEquals("<pre>foo bar</pre>", myGenerator.pre("foo bar"));
	}
	
	@Test
	public void shouldGenerateSpan(){
		assertEquals("<span class=\"\"></span>", myGenerator.span("",""));
		assertEquals("<span class=\"integer\">1</span>", myGenerator.span("1","integer"));
		assertEquals("<span class=\"string\">hi</span>", myGenerator.span("hi","string"));
	}

}
